package com.ymttest.common.entitie;

import java.lang.reflect.Field;

import com.ymttest.utils.DataUtil;
import com.ymttest.utils.YMTDateUtil;

import javafx.scene.chart.PieChart.Data;
import net.sf.json.JSONObject;

/**
 * 订单历史信息
 */
public class OrderHistoryInfo {
	/**
	 * 备注
	 */
	private String Memo;

	/**
	 * 交易id
	 */
	private Integer TraddingId;

	/**
	 * 更新时间
	 */
	private String UpdateTime;

	/**
	 * 订单状态
	 */
	private int TradingStatus;

	/**
	 * 订单历史Id
	 */
	private String TradingStatusId;

	public String getMemo() {
		return Memo;
	}

	public void setMemo(String memo) {
		Memo = memo;
	}

	public Integer getTraddingId() {
		return TraddingId;
	}

	public void setTraddingId(Integer traddingId) {
		TraddingId = traddingId;
	}

	public String getUpdateTime() {
		if(UpdateTime != null){
			UpdateTime = YMTDateUtil.parseRespDate2(UpdateTime);
		}
		return UpdateTime;
	}

	public void setUpdateTime(String updateTime) {
		if(updateTime != null){
			UpdateTime = YMTDateUtil.parseRespDate2(updateTime);
		}
	}

	public int getTradingStatus() {
		return TradingStatus;
	}

	public void setTradingStatus(int tradingStatus) {
		TradingStatus = tradingStatus;
	}

	public String getTradingStatusId() {
		return TradingStatusId;
	}

	public void setTradingStatusId(String tradingStatusId) {
		TradingStatusId = tradingStatusId;
	}
	
	public boolean equals(OrderHistoryInfo that){
		return DataUtil.Json.compareJsonObject(this.toString(), that.toString());
	}
	
	public String toString(){
		return JSONObject.fromObject(this).toString();
	}
	
	public static void main(String[] args) {
		Class c = OrderHistoryInfo.class;
		for (Field f : c.getDeclaredFields()) {
			String s = f.getName();
			System.out.println("DataUtil.verify(expect.get"
					+ s + "(), actual.get" + s
					+ "(),\"tradingStatusIdid=[\" + sid + \"]的" + s
					+ "\");");
		}
	}
	

}